[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function 440Ch (68-12) IOCTL: Code Page Switching . DOS 3.3
Handles Code Pages.
On entry: AH 44h
AL 0Ch
BX Device/file handle
CH Category: set device type
0 . device unknown
1 . COMx device
3 . CON
5 . LPTx
CL Function:
For categories 3 and 5:
4Ah . select code page
4Ch . prepare start
4Dh . prepare end
6Ah . get code page
6Bh . query prepare list
For category 3 only:
5Fh . set display information (DOS 4+)
7Fh . get display information (DOS 4+)
DS:DX Parameter packet address (see below)
Returns: AX Error code (if CF is set)
Parameter packet (as required by each of the above subfunctions):
--------------------------------------------------------------------------
CL = 4Ch Prepare Start Packet
PS_FLAGS DW 0 ;Bit 0 = 0 . Download prepare
= 1 . Cartridge prepare
PS_LENGTH DW 2*(n+1) ;Length of rest of packet. n is the
; number of additional code pages
; specified in CONFIG.SYS.
PS_NUMCP DW n ;Number of code pages
PS_CP1 DW ? ;Code page 1
:
:
PS_CPn DW ? ;Code page n
Prepare Start Error Codes:
01 Invalid function number
22 Unknown command
27 Code page conflict
29 Device error
31 Device driver does not have a copy of the code page
Write Error Codes:
27 Device or code page not found in file
29 Device error
31 File not a font file, or file structure damaged
--------------------------------------------------------------------------
CL = 4Dh Prepare End Packet
PE_LENGTH DW 2 ;Prepare end packet
PE_RSRVED DW 0 ;Must be 0
Prepare End Error Codes:
19 Bad data from font file
31 No prepare start
--------------------------------------------------------------------------
CL = 4AH or 6AH Select/Query Selected Code Page Packet
CP_LENGTH DW 2+2*(n+1) ;Packet length
CP_CPID DW ? ;Code page ID
CP_VECTOR1 DW ?,? ;DBCS vector 1
:
:
CP_VECTORn ?,? ;DBCS vector n
DB 0,0 ;End marker
Select Code Page Error Codes
26 Code page not prepared
27 Current keyboard does not support this code page
29 Device error
Query Selected Code Page Error Codes
26 No code page has been selected
27 Device error
--------------------------------------------------------------------------
CL = 6Bh Query Prepared List Packet
QL_LENGTH DW 2*((m+1)+(n+1)) ;Packet length
QL_NUMHDCP DW n ;Number of hardware code pages
QL_HWCP1 DW ? ;Hardware code page 1
:
:
QL_HWCPn DW ? ;Hardware code page n
QL_NUMCP DW m ;Number of prepared code pages
QL_CP1 DW ? ;Prepared code page 1
:
:
QL_CPm DW ? ;Prepared code page m
Query Prepared List Error Codes
26 No code pages have been selected
29 Device error
--------------------------------------------------------------------------
CL = 5Fh or 7FH Get/Set Display Information Packet
VP_LEVEL DB 0 ;Video parameters packet
VP_RESRVD DW 0 ;Reserved, must be 0
VP_LENGTH DW 14 ;Packet Length
VP_FLAGS DW 0 ;Control flags: bit 0 = 0 . Intense
; 1 . Blink
VP_MODE DB ? ;Video mode 1 . text, 2 . APA
VP_RESRVD DB 0 ;Reserved, must be 0
VP_COLORS DW ? ;Number of colors, mono = 0
VP_WIDTH DW ? ;APA display width in pixels
VP_LENG DW ? ;APA display length in pixels
VP_COLS DW ? ;Display width in characters
VP_ROWS DW ? ;Display length in characters
--------------------------------------------------------------------------
This function uses an open device handle to request a device driver to
switch code pages or get/set device information.
Use the Prepare Start function to prepare a code page, followed by
one of the IOCTL write control string calls (such as 4403h) to write the
code page. End the stream with a Prepare End function call.
You can select other functions by setting CL appropriately. The other
functions are: Query Selected Code Page, Select Code Page, and
Query Prepared List. See the information above for the information
contained in the corresponding parameter packets.
In addition, under DOS 4+, you can get or set display settings with the
Get/Set Display Information functions as shown above. This
information includes the video mode, text or APA (All Points
Addressable), and the size of the display in characters.
See Also:
44h
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson